<template>
  <div id="myChart4" style="width: 350px; height: 300px"></div>
</template>

<script>
import * as echarts from "echarts";
export default {
  data() {
    return {
      chart: null, // 用于保存图表的实例
      option: {
        xAxis: {
          type: "category",
          data: ["项目", "项目", "项目", "项目", "项目", "项目", "项目"],
          axisLabel: {
            color: "#ffffff",
          },
        },
        yAxis: {
          type: "value",
        },
        series: [
          {
            data: [120, 200, 150, 80, 70, 110, 130],
            type: "bar",
            itemStyle: {
              color: "#1818db", // 柱子颜色
            },
          },
        ],
      },
    };
  },
  mounted() {
    this.chart = echarts.init(document.getElementById("myChart4"));
    this.chart.setOption(this.option);
  },
  // ... 其他选项，如methods, computed等
};
</script>

<style lang="scss">
/* 样式代码 */
</style>
